package model.po;

import javax.persistence.*;
import java.util.Date;

/**
 * @author winkyle
 * @date 2018/06/22
 * @description 用户信息实体类
 */
@Entity
public class UserInfo {
	/**
	 * 用户Id
	 */
	@Id
	@Column(name="pk_user_id",length=16,nullable=false,updatable=false,insertable=true,unique=true)
	private String userId;
	
	/**
	 * 账号，用电话号码做账号
	 */
	@Column(length=12,nullable=false,unique=true)
	private String account;
	
	/**
	 * 密码
	 */
	@Column(length=16,nullable=false)
	private String password;
	
	/**
	 * 用户名
	 */
	@Column(length=12,nullable=false)
	private String nick;

	/**
	 * 生日
	 */
	@Temporal(TemporalType.DATE) 
	private Date birthday;
	
	/**
	 * 性别,G:女(girl) B:男(boy)
	 */
	private Character sex;
	
	/**
	 * 头像地址
	 */
	@Column(length=50)
	private String headPortrait;
	
	/**
	 * 公司
	 */
	@Column(length=50)
	private String company;
	
	/**
	 * 职位
	 */
	@Column(length=20)
	private String post;
	
	/**
	 * 创建时间
	 */
	@Column(updatable = false)  
    @org.hibernate.annotations.CreationTimestamp  
    @Temporal(TemporalType.TIMESTAMP) 
	private Date createTime;
	
	/**
	 * 更新时间
	 */
	@Column(updatable = true) 
	@org.hibernate.annotations.UpdateTimestamp  
	@Temporal(TemporalType.TIMESTAMP) 
	private Date updateTime;

	
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNick() {
		return nick;
	}

	public void setNick(String nick) {
		this.nick = nick;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public Character getSex() {
		return sex;
	}

	public void setSex(Character sex) {
		this.sex = sex;
	}

	public String getHeadPortrait() {
		return headPortrait;
	}

	public void setHeadPortrait(String headPortrait) {
		this.headPortrait = headPortrait;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getPost() {
		return post;
	}

	public void setPost(String post) {
		this.post = post;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}
